/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Daniel Cruz
 */
@Embeddable
public class BPermisoMenuPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "perm_id")
    private long permId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "per_id")
    private long perId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "men_id")
    private long menId;

    public BPermisoMenuPK() {
    }

    public BPermisoMenuPK(long permId, long perId, long menId) {
        this.permId = permId;
        this.perId = perId;
        this.menId = menId;
    }

    public long getPermId() {
        return permId;
    }

    public void setPermId(long permId) {
        this.permId = permId;
    }

    public long getPerId() {
        return perId;
    }

    public void setPerId(long perId) {
        this.perId = perId;
    }

    public long getMenId() {
        return menId;
    }

    public void setMenId(long menId) {
        this.menId = menId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) permId;
        hash += (int) perId;
        hash += (int) menId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BPermisoMenuPK)) {
            return false;
        }
        BPermisoMenuPK other = (BPermisoMenuPK) object;
        if (this.permId != other.permId) {
            return false;
        }
        if (this.perId != other.perId) {
            return false;
        }
        if (this.menId != other.menId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.BPermisoMenuPK[ permId=" + permId + ", perId=" + perId + ", menId=" + menId + " ]";
    }
    
}
